
    <?
    $no = 1;
    $no_peserta = 1;
    foreach ($peserta->result() as $row) {
        if($no==1){
            echo
'
    <style type="text/css">
        <!--
        .judul{	
            font-size:17px;
            font-weight: bold;
            text-align:center;
        } 

        table.isi_tabel
        {
            border-width: 0 0 1px 1px;
            border-spacing: 0;
            border-collapse: collapse;
            border-style: solid;
        }
        -->
    </style>
    <head>
    <p class="judul">Pembagian Kamar Ecamp Batch '.$nama_batch.'</p>
    <table width="532" border="1" class="isi_tabel">
        <tr>
            <td width="20"><div align="center">No</div></td>
            <td width="72"><div align="center">No Kamar</div></td>
            <td width="223"><div align="center">Nama/No Peserta</div></td>
            <td width="106"><div align="center">Tanda Tangan</div></td>
            <td width="77"><div align="center">Keterangan</div></td>
        </tr>
';
        }
        
        
        if($no<=11){
            $no_kamar = $row->NO_KAMAR;
            if ($row->PESERTA_1 == '0') {
                $peserta_1 = "";
            }
            else{
                $peserta_1 = $row->PESERTA_1;
            }


            if ($row->PESERTA_2 == '0') {
                $peserta_2 = "";
            }
            else{
                $peserta_2 = $row->PESERTA_2;
            }


            echo '
                <tr>
                    <td rowspan="2" align="center">' . $no . '</td>
                    <td rowspan="2" align="center">' . $no_kamar . '</td>
                    <td height="27">' . $no_peserta . '. ' . $peserta_1 . '</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>';
            $no_peserta++;
            echo'
                <tr>
                    <td height="27">' . $no_peserta . '. ' . $peserta_2 . '</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                ';

//            if($no%2 == 0){
//                echo '<p style="page-break-after: always">&nbsp;</p>';
//            }

            
            $no_peserta = 1;
            $no++;
            if($no==12){
                echo '<p></p>';
                
                
            }
        }
        
        else
        {
            
            
            
//        if($no%12 == 0){
//            echo '<p style="page-break-after: always">&nbsp;</p>';
//        }
            
            
            
            if($no==12){
                //echo '<p style="page-break-after: always">&nbsp;</p>';
                echo
'
    <style type="text/css">
        <!--
        .judul{	
            font-size:17px;
            font-weight: bold;
            text-align:center;
        } 

        table.isi_tabel
        {
            border-width: 0 0 1px 1px;
            border-spacing: 0;
            border-collapse: collapse;
            border-style: solid;
        }
        -->
    </style>
    <head>
    
    <table width="532" border="1" class="isi_tabel">
        <tr>
            <td width="20"><div align="center">No</div></td>
            <td width="72"><div align="center">No Kamar</div></td>
            <td width="223"><div align="center">Nama</div></td>
            <td width="106"><div align="center">Tanda Tangan</div></td>
            <td width="77"><div align="center">Keterangan</div></td>
        </tr>
';
            }
            
            
            $no_kamar = $row->NO_KAMAR;
            if ($row->PESERTA_1 == '0') {
                $peserta_1 = "";
            }
            else{
                $peserta_1 = $row->PESERTA_1;
            }


            if ($row->PESERTA_2 == '0') {
                $peserta_2 = "";
            }
            else{
                $peserta_2 = $row->PESERTA_2;
            }

            //echo '<p style="page-break-after: always">&nbsp;</p>';
            echo '
                <tr>
                    <td rowspan="2" align="center">' . $no . '</td>
                    <td rowspan="2" align="center">' . $no_kamar . '</td>
                    <td height="27">' . $no_peserta . '. ' . $peserta_1 . '</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>';
            $no_peserta++;
            echo'
                <tr>
                    <td height="27">' . $no_peserta . '. ' . $peserta_2 . '</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                ';



            
            $no_peserta = 1;
            $no++;
        }
        
        
        
    }
    ?>





</table>
<p>&nbsp; </p>